package com.tensquare.spit.dao;

import com.tensquare.spit.pojo.Spit;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * 吐槽数据访问层
 * @author fangyu
 * @version v1.0.0
 * @date 2020/10/13 7:09 下午
 */
public interface SpitDao extends MongoRepository<Spit, String> {

    /**
     * 根据上级ID查询吐槽列表(分页)
     * @param parentId 上级ID
     * @param pageable 分页信息
     * @return Page
     */
    public Page<Spit> findByParentid(String parentId, Pageable pageable);
}
